package br.edu.univas.jobmanager.entity;

// Generated 25/06/2011 19:15:54 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Tarefa generated by hbm2java
 */
@Entity
@Table(name = "TAREFA", schema = "PUBLIC", catalog = "PUBLIC")
public class Tarefa implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3571012177397095203L;
	private Integer idTask;
	private Categoria categoria;
	private Estado estado;
	private String nome;
	private Date horaInicio;
	private Date horaFim;

	public Tarefa() {
	}

	public Tarefa(String nome) {
		this.nome = nome;
	}

	public Tarefa(Categoria categoria, Estado estado, String nome,
			Date horaInicio, Date horaFim) {
		this.categoria = categoria;
		this.estado = estado;
		this.nome = nome;
		this.horaInicio = horaInicio;
		this.horaFim = horaFim;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_TASK", unique = true, nullable = false)
	public Integer getIdTask() {
		return this.idTask;
	}

	public void setIdTask(Integer idTask) {
		this.idTask = idTask;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_CATEGORIA")
	public Categoria getCategoria() {
		return this.categoria;
	}

	public void setCategoria(Categoria categoria) {
		this.categoria = categoria;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_ESTADO")
	public Estado getEstado() {
		return this.estado;
	}

	public void setEstado(Estado estado) {
		this.estado = estado;
	}

	@Column(name = "NOME", nullable = false, length = 50)
	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HORA_INICIO", length = 26)
	public Date getHoraInicio() {
		return this.horaInicio;
	}

	public void setHoraInicio(Date horaInicio) {
		this.horaInicio = horaInicio;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HORA_FIM", length = 26)
	public Date getHoraFim() {
		return this.horaFim;
	}

	public void setHoraFim(Date horaFim) {
		this.horaFim = horaFim;
	}

}
